package com.search.web;

import com.search.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/search")
public class ItemSearchController {

   @Autowired
   ItemService itemService;

    @GetMapping
    public void search() {
        itemService.importItem();
    }
    @GetMapping("/suggestion")
    public List<String> autoCompletion(@RequestBody String key){
      return null;
    }
}
